# coding=utf-8
from framework.base_page import BasePage

class Own_orderPage(BasePage):
    # 自建订单
    own_order = "xpath=>//*[@id='root']/div/div/div/div[2]/div[1]/div[2]/button"
    # own_order = "xpath=>//*[@id='root']/div/div/div/div[2]/div[1]/div[2]/button"

    # 公司名称
    company_name = "c=>ant-select-search__field__wrap"
    company_name_text = "c=>ant-input,ant-select-search__field"
    name_text = "韩"

    # 公司邮箱
    company_email = "i=>email"
    email_text = "20941314@1.com"

    # 联系人
    company_people = "i=>contactName"
    people_text = "halo world！"

    # 电话
    company_mobile = "i=>mobile"
    mobile_text = "1233211234567"

    # 船期变化收件人
    data_change_people = ""
    data_change_people_text = ""

    # 船期变化抄送人
    data_change_cc = ""
    data_change_cc_text = ""

    # 订单变化收件人
    order_change_people = ""
    order_change_people_text = ""

    # 订单变化抄送人
    order_change_cc = ""
    order_change_cc_text = ""

    # 日志收件人
    report_change_people = ""
    report_change_people_text = ""

    # 日志抄送人
    report_change_cc = ""
    report_change_cc_text = ""

    # 客户页下一步
    customer_button = "c=>ant-btn,ant-btn-primary"

    # 船
    ship = "c=>ant-select-selection__rendered"
    ship_text = "c=>ant-select-search__field"
    ship_name = "12345"

    # 下一步按钮
    next_button = "c=>ant-btn-primary"

    # 账单抬头
    billingInstruction = "i=>billingInstruction"
    billingInstruction_text = "你猜"

    # 输入邮箱
    mail = "c=>email-input"
    mail_text = "1314@0.com"

    def click_ownorder(self):
        self.click(self.own_order)

    def input_name(self, text):
        self.click(self.company_name)
        self.type(self.company_name_text, text)

    def input_email(self, text):
        self.type(self.company_email, text)

    def input_people(self, text):
        self.type(self.company_people, text)

    def input_mobile(self, text):
        self.type(self.company_mobile, text)

    def input_datachange_people(self, text):
        self.type(self.data_change_people, text)

    def input_datachange_cc(self, text):
        self.type(self.data_change_cc, text)

    def input_orderchange_people(self, text):
        self.type(self.order_change_people, text)

    def input_orderchange_cc(self, text):
        self.type(self.order_change_cc, text)

    def input_reportchange_people(self, text):
        self.type(self.report_change_people, text)

    def input_reportchange_cc(self, text):
        self.type(self.report_change_cc, text)

    def Customer_button(self):
        self.click(self.customer_button)

    def input_ship(self):
        self.click(self.ship)
        self.type(self.ship_text, text=self.ship_name)

    def finally_button(self):
        self.click(self.next_button)

    def bill_Info(self):
        self.type(self.billingInstruction, text=self.billingInstruction_text)

    def mail_info(self):
        self.type(self.mail, text=self.mail_text)
